class AssertUtil:

    # 封装ihrm的断言
    @classmethod
    def ihrm_assert(cls, resp, status_code, success, code, message):
        assert status_code == resp.status_code
        assert success == resp.json().get("success")
        assert code == resp.json().get("code")
        assert message == resp.json().get("message")

    # 封装tpshop的断言
    @classmethod
    def tpshop_assert(cls, login_resp, status_code, status, msg):
        assert status_code == login_resp.status_code
        assert status == login_resp.json().get("status")
        assert msg == login_resp.json().get("msg")


    #封装tpshop注册的断言
    @classmethod
    def tpshop_regist_assert(cls,regist_resp,status_code,status,msg):
        # 断言 响应状态码 200
        assert status_code == regist_resp.status_code
        # 断言 响应体 status 1
        assert status == regist_resp.json().get('status')
        # 断言 响应体 msg 注册成功
        assert msg == regist_resp.json().get('msg')
